import { useModel } from "umi";

import EditInnerMemberInfo from "../components/member/InnerEdit";

const useHelperMember = () => {
    const { setModalVisible, setModalTitle, setModalWidth, setModalComponent } = useModel("global.modal");

    const openEditInnerMember = (record, index, updateMemberInfo) => {
        setModalTitle("编辑内部成员信息");
        setModalComponent(<EditInnerMemberInfo record={record} index={index} updateMemberInfo={updateMemberInfo} />);
        setModalVisible(true);
    };

    return { openEditInnerMember };
};

export default useHelperMember;
